﻿using System.Web.Services;
using CounterServerModel.Authentication;

namespace SmartCounters.WebServices
{
    /// <summary>
    /// This is a Web Service that represents Authentication Service in the model of the system.
    /// </summary>
    [WebService(Namespace = "http://smartcounters.org")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class AuthenticationWebService : WebService
    {
        [WebMethod]
        public AuthenticatedUserCredentials Authenticate(string i_Username, string i_Password)
        {
            return new AuthenticationService().Authenticate(new UserCredentials(i_Username, i_Password));
        }
    }
}
